/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pruebaes.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author luisfernando
 */
@Entity
@Table(name = "inspectores")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Inspectores.findAll", query = "SELECT i FROM Inspectores i"),
    @NamedQuery(name = "Inspectores.findById", query = "SELECT i FROM Inspectores i WHERE i.id = :id"),
    @NamedQuery(name = "Inspectores.findByCedula", query = "SELECT i FROM Inspectores i WHERE i.cedula = :cedula"),
    @NamedQuery(name = "Inspectores.findByDistrito", query = "SELECT i FROM Inspectores i WHERE i.distrito = :distrito"),
    @NamedQuery(name = "Inspectores.findByEmpresa", query = "SELECT i FROM Inspectores i WHERE i.empresa = :empresa"),
    @NamedQuery(name = "Inspectores.findByInspector", query = "SELECT i FROM Inspectores i WHERE i.inspector = :inspector")})
public class Inspectores implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Size(max = 2147483647)
    @Column(name = "cedula")
    private String cedula;
    @Size(max = 2147483647)
    @Column(name = "distrito")
    private String distrito;
    @Size(max = 2147483647)
    @Column(name = "empresa")
    private String empresa;
    @Column(name = "inspector")
    private Boolean inspector;

    public Inspectores() {
    }

    public Inspectores(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCedula() {
        return cedula;
    }

    public void setCedula(String cedula) {
        this.cedula = cedula;
    }

    public String getDistrito() {
        return distrito;
    }

    public void setDistrito(String distrito) {
        this.distrito = distrito;
    }

    public String getEmpresa() {
        return empresa;
    }

    public void setEmpresa(String empresa) {
        this.empresa = empresa;
    }

    public Boolean getInspector() {
        return inspector;
    }

    public void setInspector(Boolean inspector) {
        this.inspector = inspector;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Inspectores)) {
            return false;
        }
        Inspectores other = (Inspectores) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.pruebaes.entidades.Inspectores[ id=" + id + " ]";
    }
    
}
